<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

// ------------------------------------------------------------------------

/**
 * Application
 *
 */
class Welcome extends K9_Deploy_Controller
{
	/**
     * Constructor
     *
     * @access  public
     * @return  void
     */
	public function __construct()
	{
		parent::__construct();	
		//$this->_check_permit();
		//$this->load->model('deploy/chcode_info_model');
		$this->load->library('deploy/form');
		$this->load->helper('str');
	}
	
	// ------------------------------------------------------------------------
	
	/**
     * Default entrance
     *
     * @access  public
     * @param   int
     * @return  void
     */
	public function view()
	{
		$data['language'] = $this->language;
		
		if ($this->session->userdata('uid'))
		{	
			$this->array = $this->uri->uri_to_assoc(4);
			$this->_template ( $this->language . '/welcome', $data );
		}
		else
		{
			$this->load->view($this->language.'/login',$data);
		}
	}

	private function _get_chcodes($list){
		$result = array();
		foreach($list as $row){
			$result[] = $row['chcode']; 
		}
		return $result;
	}
}
